package com.lin.community_thumb_sys.controller;

import com.lin.community_thumb_sys.common.BaseResponse;
import com.lin.community_thumb_sys.common.ResultUtils;
import com.lin.community_thumb_sys.model.vo.BlogVO;
import com.lin.community_thumb_sys.service.BlogService;
import jakarta.annotation.Resource;
import jakarta.servlet.http.HttpServletRequest;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @version 1.0
 * @Author linzixiong
 * @Data 2025/8/15  15:40
 * @description：TODO
 */
@RestController
@RequestMapping("blog")
public class BlogController {
    @Resource
    private BlogService blogService;

    @GetMapping("/get")
    public BaseResponse<BlogVO> get(long blogId, HttpServletRequest request) {
        BlogVO blogVO = blogService.getBlogVOById(blogId, request);
        return ResultUtils.success(blogVO);
    }
}
